﻿<%@ Page Title="" Language="C#" MasterPageFile="~/AdminCP/AdminTemplate.Master" AutoEventWireup="true"
    CodeBehind="PostAdvertisement.aspx.cs" Inherits="RealtorsPortal.AdminCP.PostAdvertisement" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
    <title>Post a new advertisement</title>
    <script type="text/javascript">
        $(document).ready(function () {

            $("navheadADV").addClass("selected");
            $('#mnuAdv').css("display", "block");
            $(".submenu li a[title='Post a new advertisement']").css({ "color": "#fff", "background": "#222", "border": "1px solid #333" });
            $("#floor").hide();
        });
    </script>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <h1>POST A NEW ADVERTISEMENT</h1>
    ______________________________________________________________________________________________
    <fieldset>
        <legend>Advertisement information</legend>
        <div class="input_field">
            <label>
                Service package:
            </label>
            <asp:DropDownList ID="ddlPackages" runat="server" Width="215px" OnSelectedIndexChanged="ddlPackages_SelectedIndexChanged" AutoPostBack="true">
            </asp:DropDownList>
            <asp:RequiredFieldValidator ID="rfv9" runat="server" ControlToValidate="ddlPackages"
                    CssClass="validate_error"
                    ToolTip="Title"
                    InitialValue="--Select Package--"
                    ForeColor="" />
        </div>

        <div class="input_field">
            <label>
                Type of adv:
            </label>
            <asp:RadioButton ID="rdbSell" runat="server" CssClass="radio" GroupName="type" Checked="True" />
            Sell &nbsp;
            <asp:RadioButton ID="rdbRent" runat="server" CssClass="radio" GroupName="type" />
            Rent &nbsp;
            <%--<asp:RadioButton ID="rdbBuy" runat="server" CssClass="radio" GroupName="type" />
            Buy--%>
        </div>

        <div class="input_field">
            <label>
                Category:
            </label>
            <asp:DropDownList ID="ddlCategory" runat="server" Width="130px" AutoPostBack="true" OnSelectedIndexChanged="ddlCategory_SelectedIndexChanged">
            </asp:DropDownList>
            <asp:RequiredFieldValidator ID="rfv10" runat="server" ControlToValidate="ddlCategory"
                    CssClass="validate_error"
                    ToolTip="Title"
                    InitialValue="--Select Category--"
                    ForeColor="" />
        </div>
        <div class="input_field">
            <label>
                Country:
            </label>
            <asp:DropDownList ID="ddlCountry" runat="server" Width="130px" OnSelectedIndexChanged="ddlCountry_SelectedIndexChanged" AutoPostBack="true">
                <asp:ListItem Text="----Select Country----"></asp:ListItem>
            </asp:DropDownList>
            <asp:RequiredFieldValidator ID="rfv11" runat="server" ControlToValidate="ddlCountry"
                    CssClass="validate_error"
                    ToolTip="Title"
                    InitialValue="--Select Country--"
                    ForeColor="" />
            &nbsp;&nbsp; Region:
            <asp:DropDownList ID="ddlRegion" runat="server" Width="130px" OnSelectedIndexChanged="ddlRegion_SelectedIndexChanged" AutoPostBack="true">
            </asp:DropDownList>
            <asp:RequiredFieldValidator ID="rfv12" runat="server" ControlToValidate="ddlRegion"
                    CssClass="validate_error"
                    ToolTip="Title"
                    InitialValue="--Select Region--"
                    ForeColor="" />
        </div>


        <div class="input_field">
            <label>
                City:
            </label>
            <asp:DropDownList ID="ddlCity" runat="server" Width="130px" OnSelectedIndexChanged="ddlCity_SelectedIndexChanged1" AutoPostBack="true">
            </asp:DropDownList>
            <asp:RequiredFieldValidator ID="rfv13" runat="server" ControlToValidate="ddlCity"
                    CssClass="validate_error"
                    ToolTip="Title"
                    InitialValue="--Select City--"
                    ForeColor="" />
            &nbsp;&nbsp; District:
            <asp:DropDownList ID="ddlDistrict" runat="server" Width="130px" AutoPostBack="false">
            </asp:DropDownList>
            <asp:RequiredFieldValidator ID="rfv14" runat="server" ControlToValidate="ddlDistrict"
                    CssClass="validate_error"
                    ToolTip="Title"
                    InitialValue="--Select District--"
                    ForeColor="" />
        </div>

        <div class="input_field">
            <label>
                Title:
            </label>
            <asp:TextBox ID="txtTitle" runat="server" Width="300px"></asp:TextBox>
            &nbsp;&nbsp;
            <asp:RequiredFieldValidator ID="rfv" runat="server"
                CssClass="validate_error"
                ToolTip="Title"
                ForeColor=""
                ControlToValidate="txtTitle" />
        </div>
        <div class="input_field">
            <label>
                Address:
            </label>
            <asp:TextBox ID="txtAddress" runat="server" Width="300px"></asp:TextBox>
            &nbsp;&nbsp;
                <asp:RequiredFieldValidator ID="rfv8" runat="server" ControlToValidate="txtAddress"
                    CssClass="validate_error"
                    ToolTip="Title"
                    ForeColor="" />
        </div>
        <div class="input_field">
            <label>
                Price:
            </label>
            <asp:TextBox ID="txtPrice" runat="server" Width="50px"></asp:TextBox>$ <span class="field_desc">USD dollar</span>
            <asp:RequiredFieldValidator ID="rev7" runat="server" ControlToValidate="txtPrice"
                CssClass="validate_error"
                ToolTip="Area can not be blank"
                ForeColor="" />
            <asp:RegularExpressionValidator ID="rev8" runat="server" ControlToValidate="txtPrice"
                ValidationExpression="^\d*[0-9](|.\d*[0-9])?$"
                CssClass="validate_error"
                ToolTip="Incorrect Format"
                ForeColor=""
                ErrorMessage="Incorrect Format" />
        </div>
        <div class="input_field">
            <label>
                Area(m2):
            </label>
            <asp:TextBox ID="TextBox1" runat="server" Width="50px"></asp:TextBox>
            &nbsp;&nbsp;
                <asp:RequiredFieldValidator ID="rfv1" runat="server" ControlToValidate="TextBox1"
                    CssClass="validate_error"
                    ToolTip="Area can not be blank"
                    ForeColor="" />
            <asp:RegularExpressionValidator ID="rev1" runat="server" ControlToValidate="TextBox1"
                ValidationExpression="^\d*[0-9](|.\d*[0-9])?$"
                CssClass="validate_error"
                ToolTip="Incorrect Format"
                ForeColor="" ErrorMessage="Incorrect Format"/>
        </div>
        <div class="input_field" id="floor" runat="server">
            <label>
                Floor:
            </label>
            <asp:TextBox ID="TextBox2" runat="server" Width="50px"></asp:TextBox>
            &nbsp;&nbsp;
            <asp:RegularExpressionValidator ID="rev3" runat="server" ControlToValidate="TextBox2"
                ValidationExpression="^\d+$"
                CssClass="validate_error"
                ToolTip="Floor can not be blank!"
                ForeColor="" ErrorMessage="Incorrect Format"/>
            &nbsp;&nbsp;&nbsp;&nbsp;Built year:
            <asp:TextBox ID="TextBox5" runat="server" Width="50px"></asp:TextBox>
            &nbsp;&nbsp;
            <asp:RegularExpressionValidator ID="rev15" runat="server" ControlToValidate="TextBox5"
                ValidationExpression="^[1-9][0-9][0-9][0-9]$"
                CssClass="validate_error"
                ToolTip="Incorrect Format"
                ForeColor="" ErrorMessage="Incorrect Format"/>
        </div>
        <div class="input_field" id="BathAndBedroom" runat="server">
            <label>
                Bath room:
            </label>
            <asp:TextBox ID="TextBox3" runat="server" Width="50px"></asp:TextBox>
            &nbsp;&nbsp;
            <asp:RegularExpressionValidator ID="rev4" runat="server" ControlToValidate="TextBox3"
                ValidationExpression="^(^\d+$)|^(^\d+$)"
                CssClass="validate_error"
                ToolTip="Incorrect Format"
                ForeColor=""></asp:RegularExpressionValidator>
            &nbsp;&nbsp; Bed room:
            <asp:TextBox ID="TextBox4" runat="server" Width="50px"></asp:TextBox>
            &nbsp;&nbsp;
            <asp:RegularExpressionValidator ID="rev5" runat="server" ControlToValidate="TextBox4"
                ValidationExpression="^(^\d+$)|^(^\d+$)"
                CssClass="validate_error"
                ToolTip="Title"
                ForeColor="" ErrorMessage="Incorrect Format"/>
        </div>
        <div class="input_field" id="Amenity" runat="server">
            <label>
                Amenities:
            </label>
            <asp:TextBox ID="TextBox6" runat="server" Width="300px"></asp:TextBox>
            &nbsp;&nbsp;
        </div>
        <div class="input_field">
            <table>
                <tr>
                    <td>
                        <label style="line-height: 6;">
                            Description:
                        </label>
                    </td>
                    <td>
                        <asp:TextBox ID="TextBox7" runat="server" TextMode="MultiLine" Width="326px" Height="50px"
                            Style="clear: none;"></asp:TextBox>
                        <label style="line-height: 6;">
                            <asp:RequiredFieldValidator ID="rfv5" runat="server" ControlToValidate="TextBox7"
                                CssClass="validate_error"
                                ToolTip="Title"
                                ForeColor="" /></label>
                    </td>
                </tr>
            </table>
        </div>
        <div class="input_field">
            <label>
                Main Picture:
            </label>
            <asp:FileUpload ID="SingleUpload" runat="server" Width="300px" />
            <span class="field_desc"></span>&nbsp;
            <asp:Label ID="lblMess" runat="server" style="color: #FF0000"></asp:Label>
        </div>
        <div class="input_field">
            <label>
                Other Picture:
            </label>
            <asp:FileUpload ID="MultiUpload" runat="server" Width="300px" accept="gif|jpg" maxlength="3" multiple="true" />
            <span class="field_desc"></span>
            <div class="input_field">
                <asp:Label ID="lblFileList" runat="server"></asp:Label></div>
            <div class="input_field">
                <asp:Label ID="lblUploadStatus" runat="server"></asp:Label></div>
            <div class="input_field">
                <asp:Label ID="lblFailedStatus" runat="server"></asp:Label></div>
        </div>
        <div class="input_field no_margin_bottom">
            <label>&nbsp;&nbsp;</label>
            <asp:Button ID="btnPost" runat="server" Text="POST" CssClass="submit" OnClick="btnPost_Click" />
            <input class="submit" type="reset" value="RESET" />
        </div>
    </fieldset>
    <!-- End of fieldset -->

</asp:Content>
